import { createRouter, createWebHashHistory } from "vue-router";
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    {
      path: "/login",
      name: "login",
      meta: {
        title: "登录",
      },
      component: () => import("@/views/login.vue"),
    },
    {
      path: "/home",
      redirect: "/a",
      component: () => import("@/views/home.vue"),
      children: [
        {
          path: "/a",
          name: "a",
          meta: {
            title: "a",
          },
          component: () => import("@/views/a.vue"),
        },
        {
          path: "/b",
          name: "b",
          meta: {
            title: "b",
          },
          component: () => import("@/views/b.vue"),
        },
        {
          path: "/c",
          name: "c",
          meta: {
            title: "c",
          },
          component: () => import("@/views/c.vue"),
        },
      ],
    },
  ],
});

export default router;
